package org.bluedream.core.config.shiro.loginOrganization;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.shiro.subject.Subject;
import org.bluedream.core.module.sys.entity.User;
import javax.servlet.http.HttpSession;


/**
 * @ClassName LoginUserRealm
 * @Description TODO
 * @Author Administrator
 * @Data 2022/5/20 16:33
 * @Version
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString
public class LoginUserRealm extends User {

    private static final long serialVersionUID = -5835809290701243876L;
    private Subject subject;
    private HttpSession loginOrgSession;

    public LoginUserRealm(Subject subject, String orgCode, HttpSession loginOrgSession) {
        this.subject = subject;
        setOrgCode(orgCode);
        this.loginOrgSession = loginOrgSession;
    }

    public LoginUserRealm(Subject subject) {
        this.subject = subject;
    }

    public LoginUserRealm(String orgCode) {
        this.orgCode = orgCode;
    }

    public LoginUserRealm(HttpSession loginOrgSession) {
        this.loginOrgSession = loginOrgSession;
    }

}